import {defineStore} from 'pinia'
import {ref} from 'vue'
interface person  {
    name:string;
    age:number;
    height:number;

}
export const userInfo = defineStore({
    id:'user',
    state:()=>({
        name:'JIM',
        age:12,
        height:173
    }),
    actions:{
        set(p:person){
            this.name = p.name
            this.age= p.age
            this.height=p.height
        }
    },
    getters:{
        realName(state){
            return state.name
        }
    }
})
